home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
pgm_tool
/
lu62
/
debug
/
rem_mkdr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-03
|
3KB
|
97 lines
/*
* CopyRight 1995. Nicholas Poljakov all rights reserved.
*/
/************************* REM_MKDR.C ***************************/
/* mkdir for remote disk */
/******************************************************************/
#include <dos.h>
#include <stdio.h>
#include <string.h>
#include <io.h>
#include <fcntl.h>
#include <stdlib.h>
#include <state1.h>
extern char lu_id[8];
extern char tp_id[8];
extern char tp_exist;
extern struct part { /* partner structure */
char plu[8] ; /* str plu_name */
int psl; /* str plu_s_limit */
char mode_name[8] ; /* str mode_name */
int max_ru_size; /* str ru_h_size */
int pacing; /* str = */
unsigned char lu_type;
} pstr[4];
rem_mkdr(p,from)
int from;
char *p;
{
unsigned long conv_id;
unsigned char rts;
unsigned char wr;
unsigned int max_length ;
unsigned char tpn[64];
struct rc {
unsigned int prim;
unsigned long sec;
} v_rc;
unsigned long rc;
char p_lu[9];
char p_mode[9];
int length;
if (!tp_exist) {
tp_started
(lu_id,
tp_id,
&rc);
if (rc != 0) {
return (-1);
}
tp_exist = 1; /* TP_started O.K! */
}
strcpy (tpn,"DIR "); /* name of work */
strcat (tpn, "mkdir"); /* name of sub-funct */
strcat (tpn, p ); /* name of new directory */
/*conv_id - return param -id work link */
strcpy(p_lu, pstr[from].plu);
strcpy(p_mode, pstr[from].mode_name);
allocate (p_lu,
p_mode,
tpn,
WHEN_SESSION_ALLOCATED,
NONE,
NONE,
NULL,
NULL,
tp_id,
&conv_id,
NULL,
&v_rc) ;
if (v_rc.prim != 0) {
return (-1);
}
deallocate (tp_id,
conv_id,
Flush,
&v_rc);
if (v_rc.prim != 0) {
return -1;
}
return 0;
}